package com.aces2win.server.entities;

import java.util.Date;

import javax.jdo.annotations.PersistenceCapable;
import javax.jdo.annotations.Persistent;

import com.aces2win.shared.beans.VoteBean;
import com.google.appengine.api.users.User;

@PersistenceCapable
public class Vote {
	
	@Persistent
	private Date createTime;
	
	@Persistent
	private boolean isBullish;
	
	@Persistent
	private User user;

	public Date getCreateTime() {
		return createTime;
	}

	public void setCreateTime(Date createTime) {
		this.createTime = createTime;
	}

	public boolean isBullish() {
		return isBullish;
	}

	public void setBullish(boolean isBullish) {
		this.isBullish = isBullish;
	}

	public User getUser() {
		return user;
	}

	public void setUser(User user) {
		this.user = user;
	}
	
	public VoteBean toBean(){
		VoteBean result  = new VoteBean();
		result.setBullish(this.isBullish);
		result.setCreationDate(this.createTime);
		return result;
	}

}
